<?

/**
* local collection functions of tocmenu_Y3
*
* @author Adesanto Asman
* @version 1.0
* @license Free
* @copyright Copyright (c)2007, Adesanto Asman
* @package CLFetchers
* 
*/

/**
* @package CLFetchers
* 
*/
class CLFetchers{
  
	/**
	 * fetch the list of transaction
	 *
	 * @param string   $Db
	 * @param string   $criteria
	 * @param string   $srcDb
	 * @param integer  $nrows
	 * @param array    $res
	 * 
	 */
  function fetchLstTransaction(&$Db,
                                $criteria,
                               &$srcDb,
                               &$nrows,
                               &$res){
  	
  	$query = "SELECT LEVELMN,
  	                 TRANSACTION,
  	                 PROGRAMS,
  	                 STATUS
  	          FROM ".$srcDb." 
  	          WHERE  STATUS='"._ACTIVE."'
  	          ORDER BY LEVELMN ASC";
  	
  	$Db->execFetchQuery($query,
  	                    $nrows,
  	                    $res);
  }
  
  /**
   * fetch the detail by levelMn
   *
   * @param unknown_type $Db
   * @param unknown_type $levelMn
   * @param unknown_type $srcDb
   * @param unknown_type $nDtl
   * @param unknown_type $resDtl
   * 
   */
  function fetchDataDetail(&$Db,
                           &$levelMn,
                           &$srcDb,
                           &$nDtl,
                           &$resDtl){
                           	
    $query  = "SELECT *
               FROM ".$srcDb." 
               WHERE  LEVELMN='".$levelMn."' ";
    
    $Db->execFetchQuery($query,
                        $nDtl,
                        $resDtl);
  }
}

?> 